#include "DTD.h"
#include <stdio.h>

int dtd_parse(DTD ** arbreDTD);
int dtd_wrap(void);
void dtd_error(char *msg);

extern int dtd_debug;

int main(int args, char* argsv[])
{
	int err;
	
	//dtd_debug = 1; // pour désactiver l'affichage de l'exécution du parser LALR, commenter cette ligne

	
	//DTD* arbreDTD = new DTD();
	DTD* arbreDTD;
	//
	err = dtd_parse(&arbreDTD);
	if (err != 0) printf("Parse ended with %d error(s)\n", err);
		else  printf("Parse ended with success\n", err);	
	
		
		//string dtdm
		//Affichage de DTD ICI : 
	
	arbreDTD->afficher();
		
	
	
	return 0;
}

/*
#include "ItemDTD.h"
#include "Choix.h"
#include "Sequence.h"

int main(){

	ItemDTD it1("toto");
	ItemDTD it2("titi");
	ItemDTD it3("tata");
	ItemDTD it4("tutu");
	Choix  c;
	Sequence s;
	c.setOccurrence("*");
	s.setOccurrence("+");
	it2.setOccurrence("+");
	c.addFils(&it1);
	c.addFils(&it2);
	ContentDTD * cd=&c;
	DeclElement de,de2;
	de.setContentDTD(cd);
	ContentDTD * cds;
	s.addFils(&c);
	s.addFils(&it3);
	cds=&s;
	de2.setContentDTD(cds);
	//cds.setContentDTD(cds)
	DTD dtd;
	dtd.addElement("ele_name",&de2);
	dtd.addElement("titi",&de);
	AttributDTD ad("att", "tata");
	AttributDTD ad2("att2", "tddata");
	dtd.addAttToElement("ele_name","att",&ad);
	dtd.addAttToElement("ele_name","att2",&ad2);
	dtd.afficher();
	return 0;

}*/
